<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!-- TYPEAHEAD -->
<link rel="stylesheet" type="text/css" href="js/typeahead/typeahead.css" />
<!-- FILE UPLOAD -->
<link rel="stylesheet" type="text/css"
	href="js/bootstrap-fileupload/bootstrap-fileupload.min.css" />
<!-- SELECT2 -->
<link rel="stylesheet" type="text/css" href="js/select2/select2.min.css" />
<!-- UNIFORM -->
<link rel="stylesheet" type="text/css"
	href="js/uniform/css/uniform.default.min.css" />
<!-- JQUERY UPLOAD -->
<!-- blueimp Gallery styles -->
<link rel="stylesheet" href="js/blueimp/gallery/blueimp-gallery.min.css">
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
<link rel="stylesheet" href="js/jquery-upload/css/jquery.fileupload.css">
<link rel="stylesheet" href="js/jquery-upload/css/jquery.fileupload-ui.css">
<script src="js/jquery/jquery-2.0.3.min.js"></script>

<!-- TYPEHEAD -->
<script type="text/javascript" src="js/typeahead/typeahead.min.js"></script>
<!-- AUTOSIZE -->
<script type="text/javascript" src="js/autosize/jquery.autosize.min.js"></script>
<!-- COUNTABLE -->
<script type="text/javascript"
	src="js/countable/jquery.simplyCountable.min.js"></script>
<!-- INPUT MASK -->
<script type="text/javascript"
	src="js/bootstrap-inputmask/bootstrap-inputmask.min.js"></script>
<!-- FILE UPLOAD -->
<script type="text/javascript"
	src="js/bootstrap-fileupload/bootstrap-fileupload.min.js"></script>
<!-- SELECT2 -->
<script type="text/javascript" src="js/select2/select2.min.js"></script>
<!-- UNIFORM -->
<script type="text/javascript" src="js/uniform/jquery.uniform.min.js"></script>
<!-- JQUERY UPLOAD -->
<!-- The Templates plugin is included to render the upload/download listings -->
<script src="js/blueimp/javascript-template/tmpl.min.js"></script>
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
<script src="js/blueimp/javascript-loadimg/load-image.min.js"></script>
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
<script src="js/blueimp/javascript-canvas-to-blob/canvas-to-blob.min.js"></script>
<!-- blueimp Gallery script -->
<script src="js/blueimp/gallery/jquery.blueimp-gallery.min.js"></script>
<!-- The basic File Upload plugin -->
<script src="js/jquery-upload/js/jquery.fileupload.min.js"></script>
<!-- The File Upload processing plugin -->
<script src="js/jquery-upload/js/jquery.fileupload-process.min.js"></script>
<!-- The File Upload image preview & resize plugin -->
<script src="js/jquery-upload/js/jquery.fileupload-image.min.js"></script>
<!-- The File Upload audio preview plugin -->
<script src="js/jquery-upload/js/jquery.fileupload-audio.min.js"></script>
<!-- The File Upload video preview plugin -->
<script src="js/jquery-upload/js/jquery.fileupload-video.min.js"></script>
<!-- The File Upload validation plugin -->
<script src="js/jquery-upload/js/jquery.fileupload-validate.min.js"></script>
<!-- The File Upload user interface plugin -->
<script src="js/jquery-upload/js/jquery.fileupload-ui.min.js"></script>
<!-- The main application script -->
<script src="js/jquery-upload/js/main.js"></script>

<script>
	jQuery(document).ready(function() {
		App.setPage("randomPrint"); //Set current page
		App.init(); //Initialise plugins and elements
	});
</script>





<!-- /SIDEBAR -->
<div id="main-content">
	<div class="container">
		<div class="row">
			<div id="content" class="col-lg-12">
				<br> <br> <br>
				<!-- FORMS -->
         
				<!--startprint1-->
				<div style="padding: 10px;padding-left: 14%; ">
					<style type="text/css">
						table {
							border-collapse: collapse;
							text-align: center;
						}
						
						td {
							width: 100px;
							height: 40px;
							border: 1px solid #000;
						}
						
						tr:first-child td {
							border: none;
						}
					</style>
                     <br>
                     
					<table cellspacing="0" style="width: 85%;">
						<tr>
							<td colspan="4"><h3>
									<b>出国（境）任务承办服务单位选定表</b>
								</h3></td>
						</tr>
						<tr>
							<td style="width: 27%;height: 66px;"><h4>
									<b>任务团组名称:</b>
								</h4></td>
							<td colspan="3">${randomTests.missionName}</td>
						</tr>
						<tr>
							<td style="width: 27%;height: 66px;"><h4>
									<b>主办业务处室:</b>
								</h4></td>
							<td>${randomTests.business}</td>
							<td style="width: 21%;"><h4>
									<b>经办人：</b>
								</h4></td>
							<td>${randomTests.operator}</td>
						</tr>
						<tr>
							<td><h4>
									<b>出国（境）任务服务需求说明：</b>
								</h4></td>
							<td colspan="3" style="height: 190px;">${randomTests.specifications}</td>
						</tr>
						<tr>
							<td style="width: 27%;height: 66px;"><h4>
									<b>电脑随机选取的承办单位：</b>
								</h4></td>
							<td>${randomTests.oknum}</td>
							<td style="width: 21%;"><h4>
									<b>选取时间：</b>
								</h4></td>
							<td>${randomTests.time}</td>
						</tr>
						<tr>
							<td style="width: 27%;height: 66px;"><h4>
									<b>财务处：</b>
								</h4></td>
							<td>${randomTests.finance}</td>
							<td style="width: 21%;"><h4>
									<b>办公室：</b>
								</h4></td>
							<td>${randomTests.office}</td>
						</tr>
						<tr>
							<td><h4>
									<b>主办业务处室意见：</b>
								</h4></td>
							<td colspan="3" style="height: 190px;">${randomTests.idea}</td>
						</tr>
					</table>
				</div>
				<!--endprint1-->
                  <button id="btnPrint" onclick=preview(1) class="btn btn-lg btn-primary" style="margin-left: 44%;">打印</button>
          <a href="./getAll"><button  class="btn btn-lg btn-primary">返回</button></a>
			</div>
			<!-- /CONTENT-->
		</div>
	</div>
</div>


<script>
	function preview(oper) {
		if (oper < 10) {
			bdhtml = window.document.body.innerHTML; //获取当前页的html代码  
			sprnstr = "<!--startprint" + oper + "-->"; //设置打印开始区域  
			eprnstr = "<!--endprint" + oper + "-->"; //设置打印结束区域  
			prnhtml = bdhtml.substring(bdhtml.indexOf(sprnstr) + 18); //从开始代码向后取html  

			prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); //从结束代码向前取html  
			window.document.body.innerHTML = prnhtml;
			window.print();
			window.document.body.innerHTML = bdhtml;
		} else {
			window.print();
		}
	}
</script>


